import request from '@/utils/request'
import {declDelMessage} from "@/api/manifest/tally/tallyMessage";

// 查询运抵报告报文列表
export function listMessage(query) {
  return request({
    url: '/manifest/arrival/message/list',
    method: 'get',
    params: query
  })
}

// 查询运抵报告报文详细
export function getMessage(id) {
  return request({
    url: '/manifest/arrival/message/' + id,
    method: 'get'
  })
}

// 查询报文回执记录
export function listResultMessage(query) {
  return request({
    url: '/manifest/arrival/message/getResults',
    method: 'get',
    params: query
  })
}

// 新增运抵报告报文
export function addMessage(data) {
  return request({
    url: '/manifest/arrival/message',
    method: 'post',
    data: data
  })
}

// 申报运抵报告记录
export function declareArrivalMessage(ids) {
  return request({
    url: '/manifest/arrival/message/declare/' + ids,
    method: 'put'
  })
}

// 修改运抵报告报文
export function updateMessage(data) {
  return request({
    url: '/manifest/arrival/message',
    method: 'put',
    data: data
  })
}

// 删除运抵报告报文
export function delMessage(id) {
  return request({
    url: '/manifest/arrival/message/' + id,
    method: 'delete'
  })
}

// 导出运抵报告报文
export function exportMessage(query) {
  return request({
    url: '/manifest/arrival/message/export',
    method: 'get',
    params: query
  })
}


// 申请删除运抵报告报文
export function declDelArrivalMessage(data) {
  return request({
    url: '/manifest/arrival/message/declDelete',
    method: 'post',
    data: data
  })
}
